﻿Imports ProyectoBarcos.My.Resources

Public Module ResourceHelper
    Public Function ImagenDeResources(ByVal nombre As String) As Image
        Dim obj As Object = ResourceManager.GetObject(nombre, Culture)
        Return CType(obj, Bitmap)
    End Function

    Public Function ImagenDeResources(ByVal tipo As TipoBarco, subParteBarco As Integer, ByVal esHundido As Boolean) As Image
        Return ImagenDeResources(String.Format("H{0:0}{1:0}{2:0}", Convert.ToInt32(tipo), subParteBarco, IIf(esHundido, 1, 0)))
    End Function
End Module

